---
title: "SAIF.Business.Tasks stored procedures"
summary: "Oracle stored procedures and packages referenced by this library."
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-31
---

# SAIF.Business.Tasks stored procedures

This page catalogs the 5 distinct Oracle stored-procedure members of the `pk82036_task` package invoked by this library. **Real Oracle PL/SQL source was retrieved for the full package via the Legends CLI** (`legends oracle query --name pk82036_task`, schema `WCIS_DBA`) on 2026-08-31 — the full package spec and body (19,891 characters of source, 9 parsed code items) were returned, and all 5 catalogued members are confirmed `found`. `SAIF.Business.Tasks/clsTask.vb` and `SAIF.Business.Tasks/clsTaskCollection.vb` are **live callers**, not dead code — see [Live-caller confirmation](pk82036-task.md#live-caller-confirmation) on the detail page.

`task_insert`, `task_update`, and `task_delete` are declared twice in the package: once as a `FUNCTION … RETURN NUMBER` (the live signature bound by the .NET callers) and once as a legacy `PROCEDURE` overload marked in a source comment for removal once all applications migrate to the function form. `task_delete` performs a **soft delete** (`UPDATE task SET delete_flag = 'Y'`), not a physical row delete; only `PK82036_Task.Task_Purge` physically removes rows, and only for rows already marked `delete_flag = 'Y'`.

## Procedure catalog

| Package / Procedure | Schema | Type | Status | Purpose | Calling business objects |
| --- | --- | --- | --- | --- | --- |
| [`pk82036_task.task_insert`](pk82036-task.md#task_insert) | `WCIS_DBA` | Packaged **function**, `RETURN NUMBER` (legacy procedure overload also present, deprecated) | **found** | Insert a new task record, with server-assigned key/audit stamps and zero-to-null normalisation of claim/policy references | `clsTask.BeforeInsert` / `AfterInsert` |
| [`pk82036_task.task_select`](pk82036-task.md#task_select) | `WCIS_DBA` | Packaged procedure, `IN OUT ref_cursor` | **found** | Retrieve a single task record by sequence number | `clsTask.BeforeRetrieve` / `AfterRetrieve` |
| [`pk82036_task.task_update`](pk82036-task.md#task_update) | `WCIS_DBA` | Packaged **function**, `RETURN NUMBER` (legacy procedure overload also present, deprecated) | **found** | Update the mutable attributes of an existing task record under optimistic concurrency | `clsTask.BeforeUpdate` |
| [`pk82036_task.task_delete`](pk82036-task.md#task_delete) | `WCIS_DBA` | Packaged **function**, `RETURN NUMBER` (legacy procedure overload also present, deprecated) | **found** | **Soft-delete** a task record (`delete_flag = 'Y'`) under optimistic concurrency — not a physical delete | `clsTask.BeforeDelete` / `AfterDelete` |
| [`PK82036_Task.Task_Purge`](pk82036-task.md#task_purge) | `WCIS_DBA` | Packaged procedure, 3 `IN` + 1 `OUT VARCHAR2` | **found** | Physically purge previously soft-deleted task records for a source/category combination past a retention window | `clsTaskCollection.PurgeTasks` (`Public Shared`) |

> Not documented as a catalog member: the package also exposes `selecttasks(taskselectsql IN VARCHAR2, recordset IN OUT ref_cursor)`, which opens a caller-supplied dynamic SQL string. No call site for it was found in this repository, so it is out of scope for this catalog.

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Dependencies](../dependencies.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Database tables](../database-tables.md)
- [SQL catalog](../sql/index.md)
- [API reference](../api/index.md)

## Sources
- Oracle package specification and body: `WCIS_DBA.pk82036_task` (retrieved via `legends oracle query --name pk82036_task` on 2026-08-31)
- `SAIF.Business.Tasks/clsTask.vb`
- `SAIF.Business.Tasks/clsTaskCollection.vb`
